<?php
namespace app\before\validate;

use think\Validate;

class Grade extends Validate
{
    protected $rule = [
        'name' => 'require',
        'price' => 'require|number',
        'old_price' => 'require|number',
        
    ];
    protected $message = [
        'name.require' => '名称为必填项',
        'price.require' => '现在价格为必填项',
        'price.number' => '现在价格需为数字',
        'old_price.require' => '原价为必填项',
        'old_price.number' => '原价需为数字',
       
    ];
    protected $scene = [
        'edit' => [
            'name',
            'price',
            'old_price',
          
        ],
    ];
}
